<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>平移效果</title>
		<style type="text/css">
			.father{
				position: relative;
				height: 200px;
				width: 500px;
				border: 1px solid #4E6EF2;
				margin: 200px auto;
			}
			.son{
				position: absolute;
				height: 100px;
				width: 100px;
				left: 50%;
				top: 50%;
	/*			transform: translate(-50%,-50%);		可以用来实现定位的居中方式*/
				border: 1px solid #000000;
				background: #969896;
				transition: all 1.5s;
			}
			.father:hover .son{
				transform: translate(100px,50px);
				/*transform: translate(50%,50%);       	移动自身的50%*/
			}
		</style>
	</head>
	<body>
		<div class="father">
			<div class="son">
				
			</div>
		</div>
	</body>
</html>
